# Maintainer: Affe Null <affenull2345@gmail.com>
pkgname=bananui
pkgver=2.0.0
pkgrel=0
pkgdesc="Keypad controlled UI for feature phones"
url="https://git.abscue.de/obp/bananui/bananui"
arch="all"
license="LGPL-3.0-or-later"
makedepends="
	librsvg-dev
	libxkbcommon-dev
	meson
	pango-dev
	wayland-dev
	wayland-protocols
	"
depends="
	adwaita-icon-theme
	font-opensans
	hicolor-icon-theme
	"
_igel_commit="4fcf8c8e4522209485454d343f14cacf6ea922a7"
source="
	https://git.abscue.de/obp/bananui/bananui/-/archive/v$pkgver/bananui-v$pkgver.tar.gz
	https://git.abscue.de/stachel-os/igel-interpreter/-/archive/$_igel_commit/igel-interpreter-$_igel_commit.tar.gz
	"
subpackages="
	$pkgname-dbg
	$pkgname-demos
	$pkgname-dev
	"
options="!check" # no tests available
builddir="$srcdir/$pkgname-v$pkgver"

prepare() {
	default_prepare

	rm -rf "$builddir/subprojects/igel-interpreter"
	mv "$srcdir/igel-interpreter-$_igel_commit" "$builddir/subprojects/igel-interpreter"
}

build() {
	abuild-meson . output
	meson compile -C output
}

package() {
	DESTDIR="$pkgdir/" meson install --no-rebuild -C output
}

demos() {
	depends="font-noto-emoji"
	pkgdesc="$pkgdesc (demo applications)"
	amove usr/bin/bananui-uitest usr/bin/bananui-menutest
}

sha512sums="
05517d4f8ec5514df035edd8743ee78cad17ea4734c380fb88bdbcffd72e5968aae2a21635c828e6f13852faa421e1d2862aa1f0c5d053a4d8648708de81b6bb  bananui-v2.0.0.tar.gz
2450e908a93526f00fbb51e3de453adaf85fb12273ce025be6455061c1639046320cfb978e559209c57e18a81a076e1272a8a058eaf73ecf2b516e400fa94e29  igel-interpreter-4fcf8c8e4522209485454d343f14cacf6ea922a7.tar.gz
"
